import {
  SystemZeroCodeQuery,
  SystemZeroCodePublicJson,
  SystemZeroCodeFindById,
} from "@/services/api";
import { request, METHOD } from "@/utils/request";

/**
 * 发布
 */
export async function viewPublic(form) {
  return request(SystemZeroCodePublicJson, METHOD.POST, form);
}

/**
 * 根据Id获取
 */
export async function findById(id) {
  return request(SystemZeroCodeFindById + "/" + id, METHOD.GET, {});
}

/**
 * 列表
 */
export async function query(param) {
  return request(SystemZeroCodeQuery, METHOD.POST, param);
}

export default {
  viewPublic,
  findById,
  query,
};
